from PyQt5.QtGui import QColor

# 缺陷对应的类型

# 划伤 scratch
# 拉毛 flakes
# 爆边 broken
# 油墨色差 aberration
# 透光(漏色) light_leak
# 脏污 dirty
# 图标毛刺 whiskers
# 边部锯齿 serrated
# 漏网 leakage
# 钢化白雾 mist
# 内水迹 watermark
# 内划伤 inner scratch
# 内白点 inner white point
# 杂质 impurities
# 气泡 air bubbles
# 缺断 truncation
# 白点 white point
# 麻点 pockmark


# 瑕疵对应界面显示颜色
defect_color = {
    "scratch": QColor(0, 0, 0),  # black
    "flakes": QColor(0, 255, 0),  # green
    "broken": QColor(211, 211, 211),  # light gray
    "aberration": QColor(255, 215, 0),  # golden
    "light_leak": QColor(255, 211, 155),  # Burlywood
    "dirty": QColor(0, 255, 255),  # cyan
    "whiskers": QColor(255, 0, 0),  # red
    "serrated": QColor(0, 0, 255),  # blue
    "leakage": QColor(144, 238, 144),  # light green
    "mist": QColor(0, 0, 139),  # deep blue
    "watermark": QColor(255, 165, 0),  # orange
    "inner scratch": QColor(138, 43, 226),  # 紫罗兰色
    "inner white point": QColor(245, 245, 220),  # 米色
    "impurities": QColor(230, 230, 250),  # 薰衣草色
    "air bubbles": QColor(192, 192, 192),  # 银色
    "truncation": QColor(210, 105, 30),  # 巧克力色
    "white_point": QColor(255, 105, 180),  # hot pink
    "pockmark": QColor(255, 255, 0),  # yellow
    "other": QColor(160, 32, 240)  # purple
}

#  视窗大小
# horizontal_pixel = 16384  # 水平方向
# vertical_pixel = 16384  # 垂直方向

# 窗口界面内图型显示大小
horizontal_graphics = 600  # 水平方向
vertical_graphics = 660  # 垂直方向

# 检测精度
detection_accuracy = 0.0184
